how to deploy grafana loki on kubernetes1.19

  1. install helm(centos8)

    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
    chmod +x get_helm.sh
    ./get_helm.sh
    ln -s /usr/local/bin/helm /usr/bin/helm
    
  2. install loki

    helm repo add loki https://grafana.github.io/loki/charts
    helm repo update
    kubectl create ns loki
    helm upgrade --install loki --namespace=loki loki/loki
    
  3. add data source in grafana

    http://loki.loki:3100
    
  4. deploy fluentbit

    helm upgrade --install fluent-bit loki/fluent-bit --set loki.serviceName=loki.loki.svc.cluster.local
    
  5. references:

    https://grafana.com/docs/loki/latest/installation/helm/

    https://github.com/grafana/loki/blob/master/cmd/promtail/promtail-local-config.yaml

    https://grafana.com/docs/loki/latest/clients/fluentbit/